package cn.weixin.service.handle.impl;

import org.springframework.stereotype.Component;

import cn.weixin.common.msg.MsgType;
import cn.weixin.common.msg.req.InputMessage;
import cn.weixin.common.msg.resp.OutputMessage;
import cn.weixin.common.msg.resp.OutputTextMessage;
import cn.weixin.common.util.MessageUtil;
import cn.weixin.service.handle.MessageHandler;

/**
 * @author Han
 */
@Component(MsgType.REQ_MESSAGE_DEFAUL)
public class DefaultMessageHandler implements MessageHandler<InputMessage>{

	@Override
	public OutputMessage handle(InputMessage inputMessage) {
		OutputTextMessage outputMessage = new OutputTextMessage();
		MessageUtil.setDefault(inputMessage, outputMessage);
		outputMessage.setContent("不支持该类型!");
		return outputMessage;
	}
	
}
